﻿using System.Xml.Linq;

namespace EasyXaf.DynamicForm.Models;

public class Group : Panel
{
    public Group(Form form, Element parent) 
        : base(form, parent)
    {
        ShowCaption = true;
    }

    public override XElement CreateXElement()
    {
        return Direction switch
        {
            FlowDirection.Horizontal => new XElement("hgroup"),
            FlowDirection.Vertical => new XElement("vgroup"),
            _ => new XElement("group"),
        };
    }
}
